.class public Lrexsee/barcode/CameraPreviewCallback;
.super Ljava/lang/Object;
.source "CameraPreviewCallback.java"

# interfaces
.implements Landroid/hardware/Camera$PreviewCallback;


# instance fields
.field private final mDialog:Lrexsee/barcode/BarcodeCaptureDialog;

.field private previewHandler:Landroid/os/Handler;

.field private previewMessage:I


# direct methods
.method public constructor <init>(Lrexsee/barcode/BarcodeCaptureDialog;)V
    .locals 0
    .param p1, "dialog"    # Lrexsee/barcode/BarcodeCaptureDialog;

    .prologue
    .line 14
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 15
    iput-object p1, p0, Lrexsee/barcode/CameraPreviewCallback;->mDialog:Lrexsee/barcode/BarcodeCaptureDialog;

    .line 16
    return-void
.end method


# virtual methods
.method public onPreviewFrame([BLandroid/hardware/Camera;)V
    .locals 7
    .param p1, "data"    # [B
    .param p2, "camera"    # Landroid/hardware/Camera;

    .prologue
    const/4 v6, 0x0

    .line 23
    iget-object v2, p0, Lrexsee/barcode/CameraPreviewCallback;->mDialog:Lrexsee/barcode/BarcodeCaptureDialog;

    iget-object v0, v2, Lrexsee/barcode/BarcodeCaptureDialog;->mCameraResolution:Landroid/graphics/Point;

    .line 24
    .local v0, "cameraResolution":Landroid/graphics/Point;
    iget-object v2, p0, Lrexsee/barcode/CameraPreviewCallback;->mDialog:Lrexsee/barcode/BarcodeCaptureDialog;

    iget-boolean v2, v2, Lrexsee/barcode/BarcodeCaptureDialog;->mUseOneShotPreviewCallback:Z

    if-nez v2, :cond_0

    .line 25
    invoke-virtual {p2, v6}, Landroid/hardware/Camera;->setPreviewCallback(Landroid/hardware/Camera$PreviewCallback;)V

    .line 27
    :cond_0
    iget-object v2, p0, Lrexsee/barcode/CameraPreviewCallback;->previewHandler:Landroid/os/Handler;

    if-eqz v2, :cond_1

    .line 28
    iget-object v2, p0, Lrexsee/barcode/CameraPreviewCallback;->previewHandler:Landroid/os/Handler;

    iget v3, p0, Lrexsee/barcode/CameraPreviewCallback;->previewMessage:I

    iget v4, v0, Landroid/graphics/Point;->x:I

    iget v5, v0, Landroid/graphics/Point;->y:I

    invoke-virtual {v2, v3, v4, v5, p1}, Landroid/os/Handler;->obtainMessage(IIILjava/lang/Object;)Landroid/os/Message;

    move-result-object v1

    .line 29
    .local v1, "message":Landroid/os/Message;
    invoke-virtual {v1}, Landroid/os/Message;->sendToTarget()V

    .line 30
    iput-object v6, p0, Lrexsee/barcode/CameraPreviewCallback;->previewHandler:Landroid/os/Handler;

    .line 32
    .end local v1    # "message":Landroid/os/Message;
    :cond_1
    return-void
.end method

.method public setHandler(Landroid/os/Handler;I)V
    .locals 0
    .param p1, "previewHandler"    # Landroid/os/Handler;
    .param p2, "previewMessage"    # I

    .prologue
    .line 18
    iput-object p1, p0, Lrexsee/barcode/CameraPreviewCallback;->previewHandler:Landroid/os/Handler;

    .line 19
    iput p2, p0, Lrexsee/barcode/CameraPreviewCallback;->previewMessage:I

    .line 20
    return-void
.end method
